function correnacalc(unitchoice,method,pna,glucose){

var correna=0;

//convert SI to US
if (unitchoice){
glucose=glucose/0.055
}

//Corrected Sodium = Measured sodium + 0.016 * (Serum glucose - 100) 

sodium=pna;
if (method==1){
correna= sodium + 0.016*(glucose-100);
}

if (method==0){
correna= sodium + 0.024*(glucose-100);
}

correna=Math.round(correna);



return {
			correna:correna,
			sodium:sodium,

		};		 
}



function ref(){
// display reference
 return "Hillier TA, et al. Hyponatremia: evaluating the correction factor for hyperglycemia. Am J Med April 1999;106:399-403";

}

function help() {
	return "Standard correction of sodium for hyperglycemia uses the formula" +"<br />Na + 0.016 x (Glucose - 100)" +"<br />Hillier uses a correction factor of 0.024 instead of 0.016. See <a href=\"http://www.aafp.org/afp/991015ap/tips/9.html\">this link</a>" ; 
}